#!/usr/bin/env bash
set -e

kubeadm init \
	--pod-network-cidr 10.172.0.0/16 \
	--service-cidr 172.10.0.0/20 \
	--control-plane-endpoint=$(hostname).shared \
  --apiserver-advertise-address 0.0.0.0 \
  --image-repository registry.cn-hangzhou.aliyuncs.com/google_containers \
  --upload-certs
export KUBECONFIG=/etc/kubernetes/admin.conf
kubectl apply -f calico.yaml
